// setSeatAttrib

import axios from "axios";

export default function (seat, key, value) {
  return new Promise((resolve, reject) => {
    if (!seat || !key || !value) {
      reject(null);
    } else {
      axios
        .get(`api/seat_status_attrib.php?s=${seat}&k=${key}&v=${value}`)
        .then((response) => {
            console.log("setSeatAttrib", seat, key, value, response.data);
            if (!response.data.result) {
          } else {
          }
          resolve(response.data);
        })
        .catch((error) => {
          console.error("setSeatAttrib", seat, key, value, error);
          reject(error);
        });
    }
  });
}
